.class public Lcom/esfile/screen/recorder/media/util/d;
.super Ljava/lang/Object;
.source "AvcSpsUtil.java"


# direct methods
.method public static a(Landroid/media/MediaFormat;)Les/b9;
    .locals 2

    if-eqz p0, :cond_0

    const-string v0, "csd-0"

    .line 1
    invoke-virtual {p0, v0}, Landroid/media/MediaFormat;->containsKey(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 2
    invoke-virtual {p0, v0}, Landroid/media/MediaFormat;->getByteBuffer(Ljava/lang/String;)Ljava/nio/ByteBuffer;

    move-result-object p0

    .line 3
    :try_start_0
    invoke-static {p0}, Les/z8;->c(Ljava/nio/ByteBuffer;)Les/b9;

    move-result-object p0
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-object p0

    :catch_0
    move-exception p0

    .line 4
    invoke-static {p0}, Les/la;->a(Ljava/lang/Throwable;)V

    :cond_0
    const/4 p0, 0x0

    return-object p0
.end method

.method public static a(Ljava/lang/String;IIIII)Les/b9;
    .locals 0

    .line 5
    invoke-static/range {p0 .. p5}, Lcom/esfile/screen/recorder/media/util/d;->b(Ljava/lang/String;IIIII)Landroid/media/MediaFormat;

    move-result-object p0

    .line 6
    invoke-static {p0}, Lcom/esfile/screen/recorder/media/util/d;->a(Landroid/media/MediaFormat;)Les/b9;

    move-result-object p0

    return-object p0
.end method

.method private static b(Ljava/lang/String;IIIII)Landroid/media/MediaFormat;
    .locals 9
    .annotation build Landroidx/annotation/Nullable;
    .end annotation

    const v4, 0xf4240

    const/4 v5, 0x5

    const v6, 0x7f420888

    move-object v0, p0

    move v1, p3

    move v2, p4

    move v3, p5

    move v7, p1

    move v8, p2

    .line 1
    invoke-static/range {v0 .. v8}, Lcom/esfile/screen/recorder/media/util/p;->a(Ljava/lang/String;IIIIIIII)Ljava/util/Map;

    move-result-object p0

    .line 2
    sget-object p1, Lcom/esfile/screen/recorder/media/util/o;->a:Lcom/esfile/screen/recorder/media/util/o;

    const/4 p2, 0x1

    invoke-interface {p1, p0, p2}, Lcom/esfile/screen/recorder/media/util/o;->a(Ljava/util/Map;Z)Lcom/esfile/screen/recorder/media/util/f;

    move-result-object p0

    if-eqz p0, :cond_0

    .line 3
    iget-object p1, p0, Lcom/esfile/screen/recorder/media/util/f;->b:Landroid/media/MediaFormat;

    const-string p2, "width"

    .line 4
    invoke-virtual {p1, p2}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result p2

    const-string p3, "height"

    .line 5
    invoke-virtual {p1, p3}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result p3

    const-string p4, "frame-rate"

    .line 6
    invoke-virtual {p1, p4}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result p1

    .line 7
    iget-object p4, p0, Lcom/esfile/screen/recorder/media/util/f;->a:Lcom/esfile/screen/recorder/media/util/n;

    mul-int p2, p2, p3

    mul-int/lit8 p2, p2, 0x3

    div-int/lit8 p2, p2, 0x2

    const-wide/32 v0, 0xf4240

    int-to-long v2, p1

    div-long/2addr v0, v2

    invoke-static {p4, p2, v0, v1}, Lcom/esfile/screen/recorder/media/util/u;->a(Lcom/esfile/screen/recorder/media/util/n;IJ)Landroid/media/MediaFormat;

    move-result-object p1

    .line 8
    iget-object p0, p0, Lcom/esfile/screen/recorder/media/util/f;->a:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {p0}, Lcom/esfile/screen/recorder/media/util/n;->h()V

    return-object p1

    :cond_0
    const/4 p0, 0x0

    return-object p0
.end method
